System And Method For Performing An Operation

ABSTRACT

A system for performing an operation comprises a key ( 70 ) defining a key code in hardware, a key reader ( 78 ) for reading the key code from the key, a tool  70  ( 4   a,    4   b,    4   c ) having an operative arrangement ( 4 d, not shown) for performing an operation and a code-activated switch arrangement ( 50 ) which defines an activation code in hardware and a power source ( 32 ). The key reader and the code-activated switch arrangement are configured for communication. The code-activated switch arrangement is configured so as to selectively define at least part of an electrically conductive path from the power source to the operative arrangement according to whether a key code received from the key reader matches the activation code. Such a system may reduce the risk of unintentional connection of the power source to the operative arrangement thereby reducing the risk of unintentional activation of the operative arrangement.

FIELD OF INVENTION

The present invention relates to a system and method for performing an operation and, in particular though not exclusively, to a system and method for performing a downhole operation within an oil or gas well.

BACKGROUND TO INVENTION

It is common to perform a variety of downhole operations in an oil or gas well including firing explosive guns to create perforations, opening and closing valves, setting packers and using sensors to make measurements. In a typical downhole operation, a tool is suspended from a line or cable, and is run into a wellbore to a desired depth using a surface winch unit located at or adjacent to a wellhead. The line or cable generally extends into the wellbore through a stuffing box located at the wellhead. The stuffing box is configured to form a seal with an outer surface of the line cable whilst also permitting the line of cable to run through the stuffing box. In effect, therefore, the stuffing box provides pressure integrity for the wellbore whilst also facilitating movement of the line of cable into and/or out of the wellbore. Thereafter, the tool i activated by some action or mechanism. The tool may be activated mechanically, electrically and/or hydraulically. For example, it is common for downhole tools to be suspended from a braided cable or wireline which includes electric conductors in its core and for the tools to be electrically activated and operated with electric power supplied through the wireline from an electric power source located at surface.

It is also common for downhole tools to be suspended from a single solid metal wire or slickline and for the tools to be activated mechanically with mechanical power being delivered to the tool from a surface winch unit through the slickline.

Battery operated tools are normally suspended from slickline because it is generally easier to form a reliable seal with a surface of the slickline at the stuffing box than it is to form a reliable seal with a surface of a braided conductor such as a wireline or to form a reliable seal with a surface of coiled tubing. Consequently, downhole operations performed using slickline generally require simpler lighter equipment than downhole operations performed using wireline or coiled tubing. As such, downhole operations performed using slickline are generally more cost-effective than downhole operations performed using wireline or coil tubing. However, battery operated tools are only capable of performing electrical operations for a limited period of time based on a capacity of the battery and a rate at which the tool consumes the electrical energy stored in the battery. To preserve battery charge, it is common for such battery operated tools to include a variety of devices such as pressure sensors, temperature sensors, position sensors and/or accelerometers and to only activate the tool when such devices indicate that the tool has reached a desired location. For example, it is common to only activate such battery operated tools when a pressure sensor, a temperature sensor and/or position sensor indicate that the tool has reached or is located at a preferred position such as a preferred depth within an oil or gas well.

However, surface control of battery operated tools suspended from conventional slicklines is generally limited. Furthermore, direct monitoring of downhole operations from surface is generally not possible when a tool is suspended using conventional slickline. Accordingly, it is known to use coated or insulated slicklines in which a solid metal core is coated with a thin, electrically insulating, layer. An insulated slickline may be used to suspend a downhole tool whilst also allowing bi-directional electrical or electro-magnetic communication between a surface located transceiver and a transceiver located with the downhole tool. Accordingly, the use of an insulated slickline may enable surface controlled downhole tool activation and monitoring.

Downhole tools that contain explosive devices, such as perforating tools, are normally deployed to a desired wellbore depth and detonated electrically. Such downhole tools generally include a detonator for this purpose which is coupled ballistically to one or more explosive devices such as one or more shaped charges, to perform perforating, cutting or other downhole operations. The detonator may be activated electrically by delivering electric power from surface over a braided cable or wireline to the downhole tool. Alternatively, the detonator may be activated electrically by delivering electric power from a power source such as an electric battery or capacitor provided with the downhole tool. In either case, electrical activation may be initiated from surface.

Inadvertent or accidental activation of some downhole tools, such as perforating tools which include explosive devices, may be highly undesirable as it may pose a threat to the safety of personnel, and/or may lead to damage to the surrounding infrastructure or the environment. Accordingly, such perforating tools are typically transferred to a well site in an unarmed condition, and subsequently armed at the well site to avoid accidental detonation of the explosive devices in such tools during transport or handling. Strict operational safety precautions are normally taken at the well site to minimise the risk of premature detonation of the explosive devices. For example, it is known to operate a perforating tool via a surface located control panel which only enables activation of the perforating tool in response to the insertion of a mechanical key which fits or matches a corresponding lock mechanism defined by the control panel. The use of such a control panel may facilitate an operating procedure, wherein the mechanical key is only issued to an authorised or properly trained user so as to minimise the possibility of inadvertent or accidental activation of the perforating tool.

It is also known that certain types of explosive devices may be activated inadvertently by electromagnetic fields or stray voltages such as those which may be produced by wireless radio frequency (RF) devices. Such inadvertent activation of explosive devices may, for example, occur where the detonator is controlled by a microprocessor which is provided with the control panel at surface or with the downhole tool. A RF electromagnetic field and/or electrostatic discharge (ESD) may cause the microprocessor to operate in an unintended manner. For example, a RF electromagnetic field and/or ESD may cause the microprocessor to hang; may cause the microprocessor to execute an unintended part of firmware code provided with the processor; or may cause the microprocessor to execute one or more firmware commands in an unintended sequence. Consequently, it is known to verify firmware code for use in a microprocessor for controlling a perforating tool according to stringent standards. Verification of the firmware code to such standards may be time-consuming and costly.

To further mitigate against the risk of inadvertent activation of explosive devices, it is also standard practice to securely ground metal components and to prohibit the use of RF devices in the vicinity of a wellhead. However, imposing such operating restrictions may limit the communication options available to personnel in the vicinity of a wellhead. It is also known to safe-guard the activation of a battery powered downhole tool suspended from a conventional non-insulated slickline. For example, it is known to safeguard the activation of a battery powered perforating tool which is suspended from a conventional slickline using time-, pressure- and/or temperature-activated switches which are provided with the downhole tool. The use of such switches may avoid any requirement for communication between surface and the downhole tool.

A time-activated switch is configured so as to define an operational time window or gate period during which the detonator is enabled and may be activated. time-activated switch. For times before and after the operational time window, the time-activated switch is configured so as to disable the detonator thereby preventing activation of the detonator. The time-activated switch may include an electrical timer which comprises two or more microprocessors provided with the downhole tool. Such microprocessors may, for example, be provided with a firing head of the perforating tool. The microprocessors may be configured to exchange messages that are encoded using a predetermined algorithm. The final trigger command may be embedded in the algorithms and may require unpacking and/or assembly of data. Although such coding of messages provides another layer of security to prevent inadvertent activation of explosive devices, such algorithms are generally implemented using several thousand lines of source code which needs to be verified according to stringent standards so as to mitigate against the risk that the microprocessors may execute an incorrect section of the code on exposure to a RF electromagnetic field and/or ESD, or that the microprocessors may execute coded commands in an incorrect sequence on exposure to a RF electromagnetic field and/or ESD.

In addition, the timer settings used are generally set to provide a wide operational time window. Once the battery operated tool has been located at a desired depth within an oil or gas well, this often means that it is necessary to wait for the timer to operational time window to “open” before the downhole tool can be activated resulting in unwanted operational delays.

SUMMARY OF INVENTION

According to a first aspect of the present invention there is provided a system for performing an operation, the system comprising:

a key defining a key code in hardware;

a key reader for reading the key code from the key;

a tool having an operative arrangement for performing an operation and a code-activated switch arrangement which defines an activation code in hardware; and

a power source,

wherein the key reader and the code-activated switch arrangement are configured for communication, and the code-activated switch arrangement is configured so as to selectively define at least part of an electrically conductive path from the power source to the operative arrangement according to whether a key code received from the key reader matches the activation code.

Such a system avoids any requirement for a key code to be stored in software or firmware. This may reduce the risk of unintentional connection of the power source to the operative arrangement thereby reducing the risk of unintentional activation of the operative arrangement. For example, this may reduce the risk of the key code being corrupted by an electromagnetic field such as a stray RF field. The use of such a system may enable the use of wireless communication equipment which relies on the use of an RF field in the vicinity of the system.

The tool may be configured to perform an operation remotely from the key reader.

The tool may be configured to perform an operation within an elongated space.

The tool may be configured to perform an operation within a tubular such as a pipe, casing, liner or the like.

The tool may be configured to perform an operation defined by or within a wellbore.

The tool may be configured to perform an operation within an oil or gas well.

The tool may comprise a downhole tool.

The operative arrangement of the tool may be configured to perform an operation on an object or surface adjacent to the tool or an environment surrounding the tool.

The operative arrangement of the tool may comprise an explosive charge.

The operative arrangement of the tool may comprise a detonator for detonating the explosive charge.

The tool may comprise a perforating tool or a perforating gun. The unintentional activation of an operative arrangement such as a perforating tool or a perforating gun may pose a threat to the safety of personnel and/or to any infrastructure surrounding the tool. Consequently, reducing the risk of unintentional activation of such operative arrangements may be particularly desirable.

The operative arrangement of the tool may be configured to perform a mechanical operation

The operative arrangement of the tool may be configured to drill, cut, or otherwise remove material from a surface adjacent to the tool.

The operative arrangement of the tool may be configured to extract a core sample from a surface adjacent to the tool

The operative arrangement of the tool may be configured to cut at least one of a tubular member, a pipe, casing, and a liner.

The tool may comprise a pipe cutter.

The operative arrangement of the tool may be configured to selectively engage, grip, or anchor itself relative to a surface adjacent to the tool.

The operative arrangement of the tool may be configured to control a flow of fluid.

The operative arrangement of the tool may be configured to restrict or enhance a flow of fluid.

The operative arrangement of the tool may be configured to pump a fluid.

The operative arrangement of the tool may be configured to form a blockage, an occlusion or a seal in an elongated space.

The operative arrangement of the tool may be configured to actuate a packer.

The tool may comprise one or more sensors. The one or more sensors may provide an indication of the tool's location and/or condition. This may allow an operator to establish whether the tool has reached a desired location before activating the operative arrangement.

The tool may comprise one or more sensors for sensing a property of an environment around the tool.

The tool may comprise a temperature sensor. The temperature sensor may provide an indication of temperature in an environment around the tool. The tool may comprise a pressure sensor. The pressure sensor may provide an indication of pressure in an environment around the tool. Such sensors may allow an operator to establish whether the tool has reached a desired location, for example a downhole location, before activating the operative arrangement. Such sensors may allow an operator to establish whether a condition of the tool corresponds to a desired tool condition before activating the operative arrangement.

The tool may comprise one or more sensors for sensing a position, depth, orientation, speed and/or acceleration of the tool. Such sensors may allow an operator to establish whether the tool has reached a desired location, for example a downhole location, before activating the operative arrangement.

The power source may be located with the tool. This may be desirable in the case of a downhole tool where the downhole tool is suspended from a support member which is not capable of delivering any significant electrical power to the downhole tool. This may be particularly desirable where the downhole tool is suspended from a non-conductive support member or from an insulated slickline.

The power source may comprise a battery.

The power source may be located remotely from the tool.

The system may comprise a communication system for communicating the key code from the key reader to the code-activated switch arrangement.

The communication system may comprise a transmitter, a communication channel and a receiver.

The communication channel may comprise a communication member.

The communication member may comprise a reelable member for supporting the tool.

The communication member may comprise insulated slickline. Using an insulated slickline as the communication member may be advantageous because it is generally easier to form a reliable seal with a surface of a slickline within a stuffing box at a wellhead of an oil or gas well than it is to form a reliable seal with a surface of a braided conductor such as a wireline or to form a reliable seal with a surface of coiled tubing at a wellhead of an oil or gas well. Consequently, downhole operations performed using insulated slickline may require simpler lighter equipment than downhole operations performed using wireline or coiled tubing. As such, downhole operations performed using insulated slickline are generally more cost-effective than downhole operations performed using wireline or coil tubing.

The communication member may comprise wireline and/or coiled tubing.

The communication member may comprise an electrical conductor and/or an optical fibre.

The key code may comprise a plurality of bits.

The key reader may be configured to read the key code one bit at a time.

The communication system may be configured to communicate the key code to the code-activated switch arrangement of the tool one bit at a time.

Such a system may employ relatively simple algorithms implemented in software and/or firmware for reading the key code from the key and for communicating the key code from the key reader to the code-activated switch arrangement. Such algorithms are only capable of processing the key code in a bit-by-bit fashion and do not contain any script capable of processing more than one of the bits of the key code at a time. Activating the code-activated switch arrangement bit-by-bit in this way means that the operative arrangement is only connected to the power source after the same algorithms have been successfully executed multiple times. This may reduce the risk of unintentional activation of the operative arrangement. The algorithms may also be particularly simple. In effect, this not only further reduces the risk of unintentional activation of an operative arrangement as a result of corruption of the algorithms by an electromagnetic field, but also means that the algorithms are less prone to errors and are more easily verified. The power source may be connected to the tool via the communication member.

The system may comprise a user-interface controller. The user-interface controller may be configured for communication with the key reader. The user-interface controller may be located with or adjacent to the key reader. The user-interface controller may comprise a transceiver for transmitting and/or receiving information to and/or from the communication channel.

The system may comprise a tool controller. The tool controller may be configured for communication with the code-activated switch arrangement. The tool controller may be located with the tool. The tool controller may comprise a transceiver for transmitting and/or receiving information to and/or from the communication channel.

The communication system may comprise a bi-directional communication system. A bi-directional communication system may not only allow control information to be communicated from the key reader to the code-activated switch arrangement, but may also allow sensed information to be communicated from the tool controller to the user-interface controller.

The communication system may comprise a transceiver at either end of a communication channel.

The code-activated switch arrangement may comprise a power input terminal, a power output terminal and a plurality of switch devices connected electrically in series between the power input terminal and the power output terminal so as to define an internal electrically conductive path from the power input terminal to the power output terminal when the key code matches the activation code.

The activation code may be defined by the connectivity between the switch devices.

Each of the switch devices may comprise a common terminal, two selectable terminals, and a pair of control terminals. The control terminals of each switch may be configured to receive a different bit of the key code.

Each switch device may be configured so as to selectively make an electrically conductive path between the common terminal and one of the selectable terminals and to provide a physical gap in a path between the common terminal and the other of the selectable terminals.

The common terminal of a first switch device may be connected to the power input terminal, one of the selectable terminals of a last switch device may be connected to the power output terminal, and one of the selectable terminals of each of the other switch devices may be connected to a common terminal of the next adjacent switch device so as to define the activation code. The activation code is thereby defined by the connectivity between the adjacent switch devices. As such, the activation code is defined in the hardware of the code-activated switch arrangement or is hardwired in the code-activated switch arrangement.

Each of the switch devices may comprise a latching switch device.

Each of the switch devices may comprise a non-latching switch device which is configured to return to a normally-open configuration in the event of loss of power to the control terminals. The use of such switch devices may ensure fail-safe operation of the code-activated switch arrangement in the event of loss of power to the control terminals.

Each of the switch devices may comprise a relay.

Each of the switch devices may comprise a single pole double throw (SPDT) relay comprising a common terminal, two selectable terminals, and a pair of control terminals, wherein the control terminals of each relay may be configured to receive a different bit of the key code.

Each of the switch devices may comprise an electro-mechanical relay. An electro-mechanical relay may define a physical separation between relay contacts. Accordingly, an electro-mechanical relay may provide a relatively high degree of electrical isolation (often to very high voltages) between unconnected terminals and/or a relatively high degree of electrical isolation (often to very high voltages) between one or more relay activation coils and the relay contacts, thereby reducing the risk of an internal electrically conductive path being inadvertently defined through the code-activated switch arrangement from the power input terminal to the power output terminal. Furthermore the state of an electro-mechanical relay may be clearly visible and may be ascertained by inspection with relative ease compared with the state of some other types of relay, for example, compared with a solid state relay.

Each of the switch devices may comprise a reed relay.

Each of the switch devices may comprise a latching relay.

Each of the switch devices may comprise a non-latching relay.

Each of the switch devices may comprise a solid state relay.

The system may comprise at least one environment-dependent switch which is operable according to a property of an environment surrounding the tool and which is connected in series with the code-activated switch arrangement between the power source and the operative arrangement. The at least one environment-dependent switch may be configured to prevent connection of the power source to the operative arrangement until the environmental conditions surrounding the tool match expected conditions in the environment where the tool is to be activated. For example, the at least one environment-dependent switch may be configured to prevent connection of the power source to the operative arrangement until the environmental conditions surrounding the tool match expected conditions downhole.

The at least one environment-dependent switch may comprise a temperature sensitive switch. The temperature sensitive switch may be configured to prevent connection of the power source to the operative arrangement until the sensed temperature exceeds an expected downhole temperature such as 100° C., 150° C. or 200° C.

The at least one environment-dependent switch may comprise a pressure sensitive switch. The pressure sensitive switch may be configured to prevent connection of the power source to the operative arrangement until the sensed pressure exceeds an expected downhole pressure such as 5000 psi, 10,000 psi or 15,000 psi.

The system may comprise a time activated switch which is connected in series with the code-activated switch arrangement between the power source and the operative arrangement.

The time activated switch may be configured to only permit connection of the power source to the operative arrangement during a predetermined operational time window. This may allow sufficient time for the tool to be located at a desired position and/or in a desired environment before the operative arrangement can be activated. This may also facilitate the implementation of an operational procedure whereby the tool may only be recovered to surface after the operational time window has elapsed. Such a time activated switch may serve as a further safeguard to reduce the risk of unintentional activation of the operative arrangement in the event of system malfunction or failure such as a breakdown in communications and/or power loss.

The series arrangement of the code-activated switch, the environment-dependent switch and the timer activated switch may selectively define a conductive path therethrough. Accordingly, the series arrangement of the code-activated switch, the environment-dependent switch and the timer activated switch may serve as an activation arrangement for arming the operative arrangement.

The system may comprise a user-operated switch which is connected in series with the code-activated switch arrangement between the power source and the operative arrangement. Such a user-operated switch may serve as a firing switch for activating the operative arrangement provided the code-activated switch and any other switches in series therewith define a conductive path therethrough.

The user-operated switch may comprise an input terminal and an output terminal, wherein the input and output terminals are galvanically isolated.

The user-operated switch may comprise an opto-coupler switch.

The user-operated switch may comprise a relay such as an electro-mechanical relay. An electro-mechanical relay may define a physical separation between relay contacts. Accordingly, an electro-mechanical relay may provide a relatively high degree of electrical isolation (often to very high voltages) between unconnected terminals and/or a relatively high degree of electrical isolation (often to very high voltages) between one or more relay activation coils and the relay contacts, thereby reducing the risk that an electrically conductive path may be defined through the relay inadvertently. Furthermore the state of an electro-mechanical relay may be clearly visible and may be ascertained by inspection with relative ease compared with the state of some other types of relay, for example, compared with a solid state relay. The user-interface controller may be configured to receive information representative of a status of at least one of the code-activated switch arrangement, the at least one environment-dependent switch, the timer activated switch and the user operated switch.

The user-interface controller may comprise one or more indicators and/or a display.

The one or more indicators and/or the display may be configured to display information representative of a status of at least one of the code-activated switch arrangement, the at least one environment-dependent switch, the timer activated switch and the user operated switch. The one or more indicators and/or the display may allow an operator to determine an activation status of the tool.

The one or more indicators and/or the display may be configured to display information received from the one or more tool sensors. For example, the one or more indicators and/or the display may be configured to display information representative of a temperature and/or a pressure of an environment surrounding the tool. The one or more indicators and/or the display may be configured to display information representative of position, depth, orientation, speed and/or acceleration of the tool.

The one or more indicators and/or the display may allow an operator to establish whether the tool has reached a desired location.

The user-interface controller may comprise one or more controls or a keyboard for data input arrangement.

The one or more controls or the keyboard may be configured to input information and/or issue commands to the key reader and/or the code-activated switch arrangement. The one or more controls and/or the keyboard may allow an operator to arm and/or fire the operative arrangement.

The key may comprise a plurality of electrical conductors arranged so as to define the key code.

Each bit of the key code may be defined by a different pair of adjacent electrical conductors. The value of each bit may be defined according to whether the corresponding pair of adjacent electrical conductors are electrically connected together or whether the corresponding pair of adjacent electrical conductors are electrically insulated from one another.

The system may comprise a plurality of keys.

Each key may define at least a part of the key code in hardware. The key reader may be configured so as to read the key code from the plurality of keys. For example, each key may define a selection of the bits of the key code. Defining the key code using a plurality of keys may facilitate an operational procedure whereby each key is provided or allocated to a different operator. Such an operational procedure may ensure that the operative arrangement cannot be activated without the co-operation of at least two operators to thereby further reduce the risk of unintentional activation of the operative arrangement.

The tool may comprise a plurality of operative arrangements and a plurality of code-activated switch arrangements, each code-activated switch arrangement being operatively associated with a corresponding one of the operative arrangements. The system may comprise a communication system which is configured to communicate the key code to any of the code-activated switch arrangements.

Each code-activated switch arrangement may define a unique activation code in hardware. A given code-activated switch arrangement may be configured so as to selectively define at least part of an electrically conductive path from the power source to the corresponding operative arrangement according to whether a key code received by the given code-activated switch arrangement matches the unique activation code defined by the given code-activated switch arrangement.

Such a system may safeguard the activation of multiple operative arrangements, each operative arrangement being activated by a different key code. For example, such a system may be used to trigger multiple events, each event triggered by a different key code. Such a system may, in particular, facilitate multizone perforation runs, where in separate guns contained within a single tool string are detonated at different depths within an oil or gas well and/or at different times.

The code-activated switch arrangements may share a power input terminal. Each code-activated switch arrangement may further comprise a power output terminal and a plurality of switch devices connected electrically in series between the shared power input terminal and the power output terminal so as to selectively define an internal electrically conductive path from the shared power input terminal to the power output terminal according to whether the key code received by the code-activated switch arrangement matches the unique activation code defined by the code-activated switch arrangement.

Some of the switch devices of one code-activated switch arrangement may be shared with one or more of the other code-activated switch arrangements.

The tool may comprise a plurality of operative arrangements, a plurality of code-activated switch arrangements, and a plurality of power sources, each code-activated switch arrangement being operatively associated with a corresponding one of the power sources and a corresponding one of the plurality of operative arrangements. A given code-activated switch arrangement may be configured so as to selectively define at least part of an electrically conductive path from the corresponding power source to the corresponding operative arrangement according to whether the key code received by the given code-activated switch arrangement matches the unique activation code defined by the given code-activated switch arrangement.

The system may comprise a plurality of keys, each key defining a unique key code in hardware corresponding to one of the unique activation codes defined by the code-activated switch arrangements.

The key reader may be configured so as to read a key code from any of the keys.

The communication system may be configured to communicate the key code to each of the code-activated switch arrangements simultaneously. The communication system may comprise one or more processors such as one or more microprocessors and/or one or more shift registers for this purpose.

The communication system may be configured to communicate the key code to each of the code-activated switch arrangements sequentially. The communication system may comprise one or more processors such as one or more microprocessors and/or one or more shift registers for this purpose.

Each key may further define a unique address in hardware. The key reader may be configured to read an address from any of the keys. The communication system may be configured to selectively communicate the key code to one of the code-activated switch arrangements according to the address read by the key reader. This may further reduce the risk of unintentional activation of the operative arrangement.

According to a second aspect of the present invention there is provided a tool for performing an operation, comprising:

an operative arrangement for performing an operation; and

a code-activated switch arrangement,

wherein the code-activated switch arrangement defines an activation code in hardware and is configured so as to selectively define at least part of an electrically conductive path from a power source to the operative arrangement according to whether a key code received by the code-activated switch arrangement matches the activation code.

The tool may comprise the power source.

The power source may comprise a battery.

It should be understood that one or more of the optional features disclosed in relation to any aspect may apply alone or in any combination in relation to any other aspect.

According to a third aspect of the present invention there is provided a tool activation arrangement, comprising a code-activated switch arrangement which defines an activation code in hardware and which is configured so as to selectively define at least part of an electrically conductive path from a power source to an operative arrangement of a tool according to whether a key code received by the code-activated switch arrangement matches the activation code.

It should be understood that one or more of the optional features disclosed in relation to any aspect may apply alone or in any combination in relation to any other aspect.

According to a fourth aspect of the present invention there is provided a method for performing an operation, comprising:

defining a key code in hardware;

reading the key code;

communicating the key code to a code-activated switch arrangement of a tool; and

selectively defining at least part of an electrically conductive path from a power source to an operative arrangement of the tool according to whether the key code received by the code-activated switch arrangement matches an activation code defined in hardware by the code-activated switch arrangement.

The key code may comprise a plurality of bits.

The method may comprise reading the key code one bit at a time.

The method may comprise communicating the key code to the code-activated switch arrangement of the tool one bit at a time.

Such a method may be implemented using relatively simple algorithms in software and/or firmware for reading the key code and for communicating the key code from the key reader to the code-activated switch arrangement. Such algorithms are only capable of processing the key code in a bit-by-bit fashion and do not contain any script capable of processing more than one of the bits of the key code at a time. Activating the code-activated switch arrangement bit-by-bit in this way, means that the operative arrangement is only connected to the power source after the same algorithms have been successfully executed multiple times. This may reduce the risk of unintentional activation of the operative arrangement. The algorithms may also be particularly simple. In effect, this not only further reduces the risk of unintentional activation of an operative arrangement as a result of corruption of the algorithms by an electromagnetic field, but also means that the algorithms are less prone to errors and are more easily verified.

It should be understood that one or more of the optional features disclosed in relation to any aspect may apply alone or in any combination in relation to any other aspect.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will now be described by way of non-limiting example only with reference to the following drawings of which:

FIG. 1 is a schematic of a system for performing a downhole operation;

FIG. 2 is a schematic of selected parts of the system of FIG. 1;

FIG. 3(a) is a schematic of a code-activated switch arrangement for use in a downhole tool of the system of FIG. 1;

FIG. 3(b) is a schematic of a first alternative code-activated switch arrangement for use in a downhole tool of the system of FIG. 1;

FIG. 3(c) is a schematic of a second alternative code-activated switch arrangement for use in a downhole tool of the system of FIG. 1; and

FIG. 4 is a schematic of a third alternative code-activated switch arrangement for use in a downhole tool of the system of FIG. 1.

DETAILED DESCRIPTION OF THE DRAWINGS

Referring initially to FIG. 1 there is shown a system generally designated 2 for safely performing a downhole perforation operation. The system 2 includes a downhole tool generally designated 4 located within a wellbore 6 of an oil or gas well defined by a casing 8. As will be described in more detail below, the downhole tool 4 is configured to perforate the casing 8. The system 2 further includes a surface unit 10 located at or above a surface 2 which may represent a surface of the ground or a surface of the sea. The surface unit 10 includes a winch 14 and a surface controller 16. The downhole tool 4 is suspended from a communication member in the form of an insulated slickline 20 which is reelable on the winch 14 and which extends from the winch 14 to the downhole tool 4 via sheaves 22 and a wellhead arrangement generally designated 24. The winch 14 is operable so as to haul in and/or pay out the slickline 20 so as to control a position of the downhole tool 4 within the wellbore 6. The surface unit 10 further includes a slickline sensor 18 for measuring tension in a portion of the slickline 20 adjacent to the winch 14 and/or for measuring a length of slickline deployed by the winch 14. As will be described in more detail below, the surface controller 16 may serve as a user-interface for the control of the winch 14 and the operation of the downhole tool 4 and may include a display (not shown) and/or a data input arrangement (not shown) for this purpose.

As illustrated schematically in FIG. 1 and shown in greater detail in FIG. 2, the downhole tool 4 includes a control module or control sub 4 a, a power module or power sub 4 b, a safety module or safety sub 4 c and a tool module or tool sub 4 d. The control sub 4 a includes a tool controller 30 and one or more tool sensors 31. The tool sensors 31 may be configured to sense tension in a portion of the slickline 20 adjacent to the tool 4. The tool sensors 31 may be configured to sense a property such as the temperature or pressure of an environment in the wellbore 6. The tool sensors 31 may be configured to sense a position, depth, distance travelled, speed, acceleration and/or orientation of the tool 4.

The power sub 4 b includes a power source in the form of a battery 32. The safety sub 4 c includes an activation arrangement generally designated 40. The tool sub 4 d (shown only in FIG. 1) includes an operative arrangement in the form of a perforating gun 41 including a detonator 42 and one or more explosive charges 44. As will be described in more detail below, the activation arrangement 40 is configured so as to selectively allow the connection of the battery 32 to the perforating gun 41 so as to reduce the probability of unintentional activation of the perforating gun 41.

The surface controller 16 includes a surface transceiver. Similarly, the tool controller 30 includes a tool transceiver. The surface transceiver, the tool transceiver and the slickline 20 together define a bi-directional communication system in which the slickline 20 serves as a communication channel or member for transmitting signals between the surface controller 16 and the tool controller 30.

As shown in more detail in FIG. 2, the activation arrangement 40 includes a safety controller 46, a master shift register 48, an array of shift registers 49 and a code-activated switch arrangement 50. As described in more detail below, the master shift register 48 and the array of shift registers 49 are configured to clock data from the safety controller 46 to the code-activated switch arrangement 50. The activation arrangement 40 further includes a time activated switch 52, a temperature sensitive switch 54, a pressure sensitive switch 56, and a user-operated firing switch 58 connected in series with the code-activated switch arrangement 50. The user-operated firing switch 58 may include a single pole single throw (SPST) electro-mechanical relay or a SPST opto-coupler switch. The code-activated switch arrangement 50, and each of the switches 52, 54 and 56 may be configured to provide an indication of their status to the safety controller 46 which communicates the switch status via the tool controller 30, and the slickline 20 to the surface controller 16 for display to an operator.

The activation arrangement 40 further includes a signal conditioning device in the form of a voltage multiplier 59 for multiplying a voltage provided by the battery 32 via the code-activated switch arrangement 50 and the various switches, 52, 54, 56, and 58. Although not shown explicitly in FIG. 2, it should be understood that the voltage multiplier 59 may include a charge pump.

As shown in more detail in FIG. 3(a), the code-activated switch arrangement 50 includes a plurality of single pole double throw (SPDT) latching electro-mechanical relays 60 connected in series between an input terminal 61 and an output terminal 62. For example, the code-activated switch arrangement 50 may include 24 SPDT latching electro-mechanical relays 60 connected in series between the input and output terminals 61, 62. Each relay 60 includes a common terminal C and two selectable terminals A, B. One of ordinary skill in the art will appreciate that each relay 60 also includes two control terminals (not shown) which are connected to one or more solenoids or coils (not shown) of the relay 60 The one or more solenoids or coils (not shown) are operable so as to selectively define an electrically conductive path between the common terminal C and one of the selectable terminals A, B according to a data bit in the form of a control voltage applied by the safety controller 46 via the shift registers 48, 49 to the control terminals (not shown). The common terminal C of a first relay 64 is connected to the input terminal 61, one of the selectable terminals A, B of a last relay 66 is connected to the output terminal 62, and one of the selectable terminals A, B of each of the other relays 60 is connected to the common terminal C of the next adjacent relay so as to define an activation code for the code-activated switch arrangement 50 which, if applied to the control terminals (not shown) of the relays 60, will result in the formation of an electrically conductive path from the input terminal 61 to the output terminal 62.

With reference to FIG. 2, the system 2 further includes a key 70 which defines a key code in hardware which has the same number of bits as the activation code. The key 70 comprises a plurality of pairs of electrical conductors 72, each pair of electrical conductors 72 arranged so as to define a different bit of the key code according to whether the pair of adjacent electrical conductors are electrically connected together or whether the pair of adjacent electrical conductors are electrically insulated from one another. For example, as shown in FIG. 2, the key 70 may include a first pair of adjacent electrical conductors generally designated 74 which are electrically insulated from one another so as to define a first binary digit value of “0” and a second pair of adjacent electrical conductors generally designated 76 which are electrically linked or connected so as to define a second binary digit value of “1”.

The system 2 further includes a key reader 78 which is configured to read the key code from the electrical conductors 72 of the key 70. The key reader 78 is configured for communication with the surface controller 16.

In use, an operator controls the winch 14 via the surface controller 16 so as to run or lower the tool 4 into the wellbore 6. During run-in, the slickline sensor 18 measures one or more slickline parameters at surface and communicates the one or more measured slickline parameters to the surface controller 16. At the same time, the tool sensors 31 measure at least one of slickline tension, a wellbore environmental parameter, and position, depth, distance travelled, speed, acceleration and orientation of the tool 4. The one or more measured parameters are communicated by the tool controller 30 to the surface controller 16 via the slickline 20 the tool 4 is run in to the wellbore 6. The operator monitors one or more of the measured slickline parameters, one or more of the measured wellbore environmental parameters, and/or one or more of the measured tool parameters until one or more of the measured parameters indicates that the tool 4 has reached a desired position.

Once the tool 4 has been located at the desired position, an operator inserts the key 70 into the key reader 78 and provides, inputs, or otherwise issues an “ARM” command via the data input arrangement of the surface controller 16 at a desired instant. The surface controller 16 may, for example, have an “ARM” button for this purpose. On receipt of the “ARM” command, the surface controller 16 controls the key reader 78 causing it to read the key code from the plurality electrical conductors 72 of the key 70. The key code is communicated from the key reader 78 to the surface controller 16 which transmits the key code to the tool controller 30 via the slickline 20 one bit at a time. The tool controller 30 communicates the key code received from the surface controller 16 to the safety controller 46 one bit at a time. The key code is communicated from the safety controller 46 to the code-activated switch arrangement 50 one bit at a time via the shift registers 48, 49. Provided the key code received by the code-activated switch arrangement 50 matches the activation code defined by the hardwired connections between the plurality of relays 60 of the code-activated switch arrangement 50, the code-activated switch arrangement 50 provides an electrically conductive path between the input and output terminals 61, 62. When the key code received by the code-activated switch arrangement 50 matches the activation code in this way, the code-activated switch arrangement 50 is configured so as to allow or enable power to be supplied from the battery 32 to the operative arrangement subject to the configuration of the other switches, 52, 54, 56 and 58 which are connected in series with the code-activated switch arrangement 50 between the battery 32 and the voltage multiplier 59.

The time activated switch 52 is only closed during a predetermined operational time window defined by a timer 51 provided with the time activated switch 52. The time activated switch 52 is open for all times before and after the predetermined operational time window. The timer 51 may include one or more microprocessors (not shown) which define the operational time window.

The temperature sensitive switch 54 is normally open under normal surface environmental conditions. However, for typical downhole temperatures in excess of a predetermined threshold temperature, the temperature sensitive switch 54 may close so as to allow activation of the perforating gun 41. For example, the temperature sensitive switch 54 may be configured so as to close for temperatures in excess of 100° C. Similarly, the pressure sensitive switch 56 is normally open under normal surface environmental conditions. However, for typical downhole pressures in excess of a predetermined threshold pressure, the pressure sensitive switch 56 may close so as to allow activation of the perforating gun 41. For example, the pressure sensitive switch 56 may be configured so as to close for pressures in excess of 5,000 PSI.

The status of the code-activated switch arrangement 50 and each of the switches 52, 54 and 56 is communicated via the safety controller 46, the tool controller 30, and the slickline 20 to the surface controller 16 for display to an operator. When the code-activated switch arrangement 50 and switches 52, 54, and 56 are all in an electrically conductive configuration, the system 2 may be considered to be in an “ARMED” configuration. When so “ARMED”, the surface controller 16 provides an indication of, or otherwise displays, the “ARMED” configuration for an operator. The operator may then provide, input, or otherwise issue a “FIRE” command via the data input arrangement of the surface controller 16 at a desired instant. The surface controller 16 may, for example, have a “FIRE” button for this purpose. The surface controller 16 then transmits a “FIRE” signal to the tool controller 30 via the slickline 20. The tool controller 30 communicates the “FIRE” signal to the safety controller 46 which closes the user-operated switch 58, thereby connecting the battery 32 to the voltage multiplier 59 for the provision of electrical power to the detonator 42 of the perforating gun 41. On receipt of electrical power, the detonator 42 detonates the one or more explosive charges 44 thereby perforating the casing 8.

It should be understood that the key code is only defined by the electrical connectivity of the electrical conductors 72 of the key 70 and is not stored in the surface controller 16. Similarly, it should be understood that the activation code is only defined by the electrical connectivity of the relays 60 of the code-activated switch arrangement 50 and is not stored in the tool controller 30 or the safety controller 46.

Moreover, the algorithms implemented in software and/or firmware within the surface controller 16, the tool controller 30 and the safety controller 46 for reading the 24 bit code key code from the key 70 and for transferring the key code to the code-activated switch arrangement 50 are only capable of processing the key code in a bit-by-bit fashion and do not contain any script capable of processing more than one of the bits of the key code at a time. Thus, the key reader 78 reads the first bit of the key code, the surface controller 16 transmits the first bit of the key code to the safety controller 46 via the tool controller 30, and the safety controller 46 applies a corresponding control voltage to the control terminals (not shown) of the first relay 64 according to the value of the first bit of the key code. This causes the first relay 64 to adopt a “0” or “1” state according to the value of the first bit of the key code. Confirmation of this is communicated from the safety controller 46 back to the surface controller 16 via the tool controller 30. Upon receipt of confirmation of the setting of the first relay 64, the key reader 78 reads the second bit of the key code and the process is repeated bit-by-bit until each of the relays 64, 60 and 66 have been set according to the bits of the key code. Activating the code-activated switch arrangement 50 bit-by-bit in this way, means that the detonator 42 can only detonate the one or more explosive charges 44 by successfully executing the same algorithms 24 times. This provides another level of operational safety.

The algorithms implemented in software and/or firmware within the surface controller 16, the tool controller 30 and the safety controller 46 for reading the key code from the key 70 and for transmitting the key code from the key reader 78 to the code-activated switch arrangement 50 are also particularly simple. In effect, this not only further reduces the risk of unintentional activation of the perforating gun 41 as a consequence of stray RF fields, but also means that the algorithms are easily verified. In the event that the key code received by the code-activated switch arrangement 50 does not match the activation code defined by the code-activated switch arrangement 50, an open circuit will exist between the input and output terminals 61, 62 of the code-activated switch arrangement 50. This may occur if, for example, the incorrect key is inserted into the key reader 78 or if the key code which is read from the key 70 is corrupted or incorrectly transmitted from the key reader 78 to the code-activated switch arrangement 50. Under these circumstances, the system 2 will remain in a “DISARMED” configuration. On observation of such a “DISARMED” configuration displayed via the surface controller 16, an operator may provide, input or otherwise issue a “RESET” command which is transmitted to the safety controller 46 via the slickline 20 and the tool controller 30. The shift registers 48, 49 may be configured such that on receipt of such a “RESET” command, the shift registers 48, 49 reset the relays 60 of the code-activated switch arrangement 50 so as to route the voltage present on the common terminal C of each relay 60 away from the common terminal C of the next adjacent relay 60. The system 2 is then in a fully “DISARMED” configuration.

The safety controller 46 may be programmed such that if two further attempts to “ARM” the system are unsuccessful, then the safety controller 46 continuously applies a “RESET” command to the code-activated switch arrangement 50 so as to ensure that the system 2 remains in a fully “DISARMED” configuration. Under such circumstances, operational procedures may dictate that the downhole tool 4 may only be recovered from the wellbore 6 once the timer activated switch 52 has timed out i.e. once the timer activated switch 52 is configured in an open state. As a further safety precaution, the timer activated switch 52 may be configured to re-route the battery 32 to a resistive load so as to discharge the battery 32 in a controlled manner on time-out of the timer activated switch 52 and/or on complete breakdown of communications between the surface controller 16 and the tool controller 30.

The activation arrangement 40 not only facilitates a method for safely activating a downhole tool such as the perforating gun 41, but also facilitates a method for safely transporting and handling the perforating gun 41 even when the detonator 42 and the explosive charges 44 are ballistically coupled. For example, the detonator 42 and the explosive charges 44 may be ballistically coupled under controlled factory conditions during assembly of the downhole tool 4 in a location remote from the wellbore 6. The activation arrangement 40 is configured in the fully “DISARMED” configuration as described above and the perforating gun 41 is connected to the activation arrangement 40 under controlled factory conditions. The downhole tool 4 is subsequently transported on-site to the vicinity of the wellbore 6. The activation arrangement 40 and the perforating gun 41 are physically disconnected and/or separated on-site and a further on-site verification procedure of the activation arrangement 40 is performed until an “ARMED” indication is displayed at the surface controller 16. The activation arrangement 40 is configured in the fully “DISARMED” configuration as described above once again before final connection of the perforating gun 41 to the activation arrangement 40 and deployment of the downhole tool 4 into the wellbore 6. Thus, the system 2 may facilitate an assembly method which avoids the need to ballistically couple the detonator 42 and the explosive charges 44 on-site in the vicinity of the wellbore 6 where it may be more difficult to control environmental conditions and/or avoid safety hazards.

FIG. 3(b) illustrates a first alternative code-activated switch arrangement generally designated 150 for use with the activation arrangement 40. The code-activated switch arrangements 50 and 150 of FIGS. 3(a) and 3(b) share many like features and, as such, the features of the code-activated switch arrangement 150 of FIG. 3(b) have the same reference numerals as the corresponding features of the code-activated switch arrangement 50 of FIG. 3(a) incremented by “100”. The code-activated switch arrangement 150 includes a plurality of parallel connected pairs 180 of non-latching SPDT electro-mechanical relays 160 including a first parallel connected pair 184 and a final parallel connected pair 186. The common terminals (C1, C2) of each of the relays 160 of each relay pair 180, 184, 186 are connected together. Only one of the selectable terminals A1, B1, A2, B2 of a given relay pair 180, 184 is connected to the common terminals C1, C2 of the next adjacent relay pair 180, 186. Such connectivity between the different terminals of the relay pairs 180, 184, 186 means that the values of only 50% of the code bits are data bits and that 50% of the code bits serve as “data bit separators” or “data bit place-holders”. For example, the connectivity of the first relay pair 184 is such that the only selectable terminal which is connected to the common terminals C1, C2 of the next adjacent relay pair 180 is A2 and the selectable terminals A1, B1 and B2 of the first relay pair 184 are open. Accordingly, an electrical connection is only established from the first relay pair 184 to the next adjacent relay pair 180 when the value of the second bit of the key code applied to the code activated switch arrangement 150 is “0” regardless of the value of the first bit of the applied key code. Accordingly, the value of the first bit of the applied key code required to establish an electrical path between the input terminal 161 and the output terminal 162 has been represented by the symbol “X” in FIG. 3(b).

FIG. 3(c) illustrates a second alternative code-activated switch arrangement generally designated 250 for use with the activation arrangement 40. The code-activated switch arrangements 50 and 250 of FIGS. 3(a) and 3(c) share many like features and, as such, the features of the code-activated switch arrangement 250 of FIG. 3(c) have the same reference numerals as the corresponding features of the code-activated switch arrangement 50 of FIG. 3(a) incremented by “200”. The code-activated switch arrangement 250 includes a first plurality of SPDT electro-mechanical relays 260 a connected electrically in series from an input terminal 261 to a first output terminal 262 a of the code-activated switch arrangement 250. The first output terminal 262 a may be selectively coupled to a first operative arrangement (not shown) of the downhole tool 4 for the provision of power thereto. The code-activated switch arrangement 250 further includes a second plurality of SPDT electro-mechanical relays 260 b connected electrically in series from the input terminal 261 to a second output terminal 262 b of the code-activated switch arrangement 250. The second output terminal 262 b may be selectively coupled to a second operative arrangement (not shown) of the downhole tool 4 for the provision of power thereto. As shown in FIG. 3(c), the first three series-connected relays of the first and second pluralities of relays 260 a, 260 b are common to both the first and second pluralities of relays 260 a, 260 b. As such, the code-activated switch arrangement 250 defines a first unique activation code associated with the first plurality of relays 260 a and a second unique activation code associated with the second plurality of relays 260 b, wherein the first two bits of each of the first and second activation codes are identical. The code-activated switch arrangement 250 may be associated with two different keys (not shown), each key defining a key code in hardware corresponding to one of the first and second activation codes. The code-activated switch arrangement 250 may be used in conjunction with a single battery for the independent safe activation of two different operative arrangements.

FIG. 4 illustrates a third alternative code-activated switch arrangement generally designated 350 for use with the activation arrangement 40. The code-activated switch arrangements 50 and 350 of FIGS. 3(a) and 4 share many like features and, as such, the features of the code-activated switch arrangement 350 of FIG. 4 has the same reference numerals as the corresponding features of the code-activated switch arrangement 50 of FIG. 3(a) incremented by “300”. The code-activated switch arrangement 350 includes 24 SPDT latching electro-mechanical relays 360, a female connector part 390, and a male connector part 392. The relays 360 are connected in series between an input terminal 361 and an output terminal 362 via the female and male connector parts 390, 392.

The female connector part 390 is provided with the relays 360. For example, the female connector part 390 and the relays 360 may be provided together on a substrate, backplane or a circuit board such as a printed circuit board (PCB) or the like (not shown). For each relay 360, the female connector part 390 includes first, second and third electrically conductive pin receptacles 394A, 394B and 394C respectively.

The male connector part 392 may be separately formed from the female connector part 390. For each relay 360, the male connector part 392 includes first, second and third electrically conductive pins 396A, 396B and 396C respectively. The male connector part 392 includes electrically conductive links 398AC extending between the first and third pins 396A, 396C corresponding to some of the relays 360 and electrically conductive links 398BC extending between the second and third pins 396B, 396C corresponding to some of the other relays 360.

When the female and male connector parts 390, 392 are connected, the links 398AC and 398BC define the electrical connectivity between one of the selectable terminals A, B of each of the relays 360 and the common terminal C of the next adjacent relay 360 so as to define an activation code for the code-activated switch arrangement 350 which, if applied to the control terminals of the relays 360, will result in the formation of an electrically conductive path from the input terminal 361 to the output terminal 362. Such a code-activated switch arrangement 350 facilitates definition of the activation code using only the links 398AC and 398BC of the male connector part 192. Thus, different code-activated switch arrangements 350 may have identical relays 360 and identical female connector parts 390, but may define different activation codes using different male connector parts 192, each male connector part 192 having a different arrangement of links 398AC, 398BC. This may simplify the manufacturing and supply of the activation arrangement 40 and, therefore, of the safety sub 4 c shown in FIG. 2.

One skilled in the art will appreciate that various modifications may be made to the system and methods described above. For example, the safety controller 46, and the shift registers 48, 49 may be configured to apply the key code to each of the plurality of relays 60 simultaneously or sequentially.

The code-activated switch arrangement 50 may comprise a plurality of voltage measurement arrangements, wherein each voltage measurement arrangement is configured for measuring a voltage at a node between a corresponding pair of adjacent relays 60. Such a plurality of voltage measurement arrangements may allow a progression of battery voltage through the code-activated switch arrangement 50 to be measured and communicated to the surface controller 16 for monitoring by an operator via the safety controller 46, the tool controller 30 and the slickline 20. The surface controller 16 may, for example, comprise a plurality of indicators such as LEDs, each indicator corresponding to one of the plurality of relays 60. Each indicator may emit a first signal such as a green light to indicate that the corresponding relay 60 is set so as to electrically isolate the common terminal of the corresponding relay 60 from the common terminal of the next adjacent relay 60 and thereby prevent the battery voltage from being routed to the next adjacent relay 60. Each indicator may emit a second signal such as a red light to indicate that the corresponding relay 60 is set so as to electrically connect the common terminal of the corresponding relay 60 to the common terminal of the next adjacent relay 60 and thereby route the battery voltage to the next adjacent relay 60. Such an arrangement of indicators may permit an operator to monitor the progression of the battery voltage through the plurality of relays 60 of the code-activated switch arrangement 50. Put another way, such an arrangement of indicators may provide an indication of a degree to which the code-activated switch arrangement 50 is armed or energised.

Although the system 2 is configured to perform a perforation operation, it should be understood that the system may include a downhole tool configured to perform an operation other than a perforation operation. For example, the system may include a downhole tool configured to engage and/or remove material from a wellbore of an oil or gas well. The system may include a downhole tool configured to drill, mill, ream or otherwise remove material from a wellbore. The system may include a downhole tool configured to drill or otherwise form a wellbore. The system may include a downhole tool configured to cut a tubular such as a pipe, casing liner or the like. The system may include a downhole tool configured for core sampling. The system may include a downhole tool configured to perform one or more downhole operations including opening valves, closing valves, setting packers, controlling fluid flow, taking measurements and logging one or more properties of a wellbore.

One skilled in the art will also understand that although the downhole tool 4 is suspended by the insulating slickline 20 which is also used for communication between the surface controller 16 and the tool controller 30, the downhole tool 4 may be suspended from coiled tubing or from a wireline which is also used for communication between the surface controller 16 and the tool controller 30. The communication member may comprise an electrical conductor and/or an optical fibre. Additionally or alternatively, the surface controller 16 and the tool controller 30 may communicate via infrastructure which is present in and/or which defines the wellbore 6. For example, the surface controller 16 and the tool controller 30 may communicate via at least one of the insulating slickline 20 and the casing 8.

In a first variant of the system 2, a first key (not shown explicitly) may define some of the bits of the key code in hardware and a second key (not shown explicitly) may define the remainder of the bits of the key code in hardware. For example, the first key may define 10 bits of a 24 bit key code in hardware and the second key may define the remaining 14 bits of the 24 bit key code. As for the key 70 described above, each of the first and second keys may comprise a corresponding plurality of pairs of electrical conductors, each pair of electrical conductors arranged so as to define a different bit of the key code according to whether the pair of adjacent electrical conductors are electrically connected together or whether the pair of adjacent electrical conductors are electrically insulated from one another. In such a variant system, the key reader 78 would be configured to read the key code from the electrical conductors of the first and second keys and to communication the key code to the surface controller 16. The key reader 78 may, for example, be configured to read the first and second keys simultaneously or sequentially. In all other respects, the first variant of the system would be identical to the system 2 described above. The use of first and second keys as described above would facilitate a method of performing an operation, wherein the first key is provided to a first operator and the second key is provided to a second operator. Such a method would require the first and second operators to cooperate in order to arm and/or fire the perforating gun 41. The provision of the first and second keys to different operators in this way may serve as a further safeguard and would further reduce the risk of unintentional arming and/or firing of the perforating gun 41 during assembly, transport, handling and/or deployment of the downhole tool 4 and/or during downhole operations using the downhole tool 4.

In a second variant of the system 2, the downhole tool 4 may comprise a plurality of operative arrangements, a plurality of batteries and a plurality of activation arrangements, wherein each operative arrangement has a corresponding battery and a corresponding activation arrangement. For example, the downhole tool for may comprise a plurality of perforating guns, each perforating gun being identical to the perforating gun 41 shown in FIG. 1 and each perforating gun having a corresponding battery identical to the battery 32 shown in FIG. 2 and a corresponding activation arrangement like the activation arrangement 40 shown in FIG. 2 where each activation arrangement further includes a corresponding code-activated switch arrangement like the code-activated switch arrangement 50 shown in FIG. 3(a), but where each code-activated switch arrangement defines a unique activation code in hardware by virtue of a unique combination of electrical connections between adjacent serially connected electro-mechanical relays. Such a second variant of the system may include a plurality of different keys, wherein each key is associated with a different one of the operative arrangements and defines a key code corresponding to the unique activation code for the operative arrangement with which it is associated.

In a third variant of the system 2, each key further defines a unique address of a corresponding operative arrangement in hardware, the key reader 78 is further configured to read an address from any of the keys, and the surface controller 16 is configured to transmit the unique address and the key code read from each key to the tool controller 30. The tool controller 30 is configured to selectively communicate the key code to one of the code-activated switch arrangements according to the unique address. In such a third variant of the system, the key code would only be communicated to one code activated switch arrangement for activation of the corresponding operative arrangement to further reduce the likelihood of unintentional activation of the corresponding operative arrangement.

In other variants of the system 2, a power source such as a battery may be located remotely from the downhole tool 4 and power may be provided to the activation arrangement 40 via a communication member such as coiled tubing or a wireline. For example, a power source such as a battery may be located at surface and power may be provided from the power source via coiled tubing or a wireline to the activation arrangement 40. 

1. A system for performing an operation, the system comprising: a key defining a key code in hardware; a key reader for reading the key code from the key; a tool having an operative arrangement for performing an operation and a code-activated switch arrangement which defines an activation code in hardware; and a power source, wherein the key reader and the code-activated switch arrangement are configured for communication, and the code-activated switch arrangement is configured so as to selectively define at least part of an electrically conductive path from the power source to the operative arrangement according to whether a key code received from the key reader matches the activation code. 2-54. (canceled)
 55. A tool for performing an operation, comprising: an operative arrangement for performing an operation; and a code-activated switch arrangement, wherein the code-activated switch arrangement defines an activation code in hardware and is configured so as to selectively define at least part of an electrically conductive path from a power source to the operative arrangement according to whether a key code received by the code-activated switch arrangement matches the activation code.
 56. (canceled)
 57. (canceled)
 58. A tool activation arrangement, comprising a code-activated switch arrangement which defines an activation code in hardware and which is configured so as to selectively define at least part of an electrically conductive path from a power source to an operative arrangement of a tool according to whether a key code received by the code-activated switch arrangement matches the activation code.
 59. (canceled)
 60. (canceled)
 61. (canceled)
 62. (canceled)
 63. A system according to claim 1, wherein at least one of: the power source is located with the tool; the power source comprises a battery; and the power source is located remotely from the tool.
 64. A system according to claim 1, comprising a communication system for communicating the key code from the key reader to the code-activated switch arrangement, wherein the communication system comprises a transmitter, a communication channel, and a receiver.
 65. A system according to claim 64, wherein the communication channel comprises a communication member, comprising at least one of: a reelable member for supporting the tool; at least one of insulated slickline, wireline and coiled tubing; an electrical conductor; and an optical fibre.
 66. A system according to claim 65, wherein the power source is connected to the tool via the communication member.
 67. A system according to claim 64, wherein the communication system comprises a bi-directional communication system.
 68. A system according to claim 1, wherein the code-activated switch arrangement comprises a power input terminal, a power output terminal, and a plurality of switch devices connected electrically in series between the power input terminal and the power output terminal so as to selectively define an internal electrically conductive path from the power input terminal to the power output terminal according to whether the key code matches the activation code, and wherein the activation code is defined by the connectivity between the switch devices.
 69. A system according to claim 68, wherein each of the switch devices comprises a common terminal, two selectable terminals, and a pair of control terminals, and wherein the control terminals of each switch are configured to receive a different bit of the key code.
 70. A system according to claim 69, wherein each switch device is configured so as to selectively make an electrically conductive path between the common terminal and one of the selectable terminals and to provide a physical gap in a path between the common terminal and the other of the selectable terminals.
 71. A system according to claim 69, wherein the common terminal of a first switch device is connected to the power input terminal, one of the selectable terminals of a last switch device is connected to the power output terminal, and one of the selectable terminals of each of the other switch devices is connected to a common terminal of the next adjacent switch device so as to define the activation code.
 72. A system according to claim 72, wherein each of the switch devices comprises at least one of: a latching switch device or a non-latching switch device which is configured to return to a normally-open configuration in the event of loss of power to the control terminals; a relay; and an electro-mechanical relay.
 73. A system according to claim 1, comprising at least one environment-dependent switch which is operable according to a property of an environment surrounding the activation arrangement and which is connected in series with the code-activated switch arrangement between the power source and the operative arrangement, and optionally wherein the at least one environment-dependent switch comprises a temperature sensitive switch and/or a pressure sensitive switch.
 74. A system according to claim 1, comprising a time activated switch which is connected in series with the code-activated switch arrangement between the power source and the operative arrangement, and optionally wherein the time activated switch is configured to only allow connection of the power source to the operative arrangement during a predetermined operational time window.
 75. A system according to claim 1, comprising a user-operated switch which is connected in series with the code-activated switch arrangement between the power source and the operative arrangement, and optionally wherein the user-operated switch comprises an input terminal and an output terminal, and wherein the input and output terminals are galvanically isolated, and optionally wherein the user-operated switch comprises at least one of an opto-coupler switch and a relay.
 76. A system according to claim 1, wherein the key comprises a plurality of electrical conductors arranged so as to define the key code, the key code comprising a plurality of bits, each bit being defined by a different pair of adjacent electrical conductors and the value of each bit being defined according to whether the corresponding pair of adjacent electrical conductors are electrically connected together or whether the corresponding pair of adjacent electrical conductors are electrically insulated from one another.
 77. A system according to claim 1, comprising a plurality of keys, each key defining at least a part of the key code in hardware, and the key reader being configured so as to read the key code from the plurality of keys.
 78. A system according to claim 1, wherein the tool comprises a plurality of operative arrangements and a plurality of code-activated switch arrangements, each code-activated switch arrangement being operatively associated with a corresponding one of the operative arrangements, and wherein the system comprises a communication system which is configured to communicate the key code to any of the code-activated switch arrangements, and wherein each code-activated switch arrangement defines a unique activation code in hardware and a given code-activated switch arrangement is configured so as to selectively define at least part of an electrically conductive path from the power source to the corresponding operative arrangement according to whether the key code received by the given code-activated switch arrangement matches the unique activation code defined by the given code-activated switch arrangement.
 79. A system according to claim 78, wherein the code-activated switch arrangements share a power input terminal and each code-activated switch arrangement further comprises: a power output terminal; and a plurality of switch devices connected electrically in series between the shared power input terminal and the power output terminal so as to selectively define an internal electrically conductive path from the shared power input terminal to the power output terminal according to whether the key code received by the code-activated switch arrangement matches the unique activation code defined by the code-activated switch arrangement.
 80. A system according to claim 79, wherein some of the switch devices of one code-activated switch arrangement are shared with one or more of the other code-activated switch arrangements.
 81. A system according to claim 1, wherein the tool comprises a plurality of operative arrangements, a plurality of code-activated switch arrangements, and a plurality of power sources, each code-activated switch arrangement being operatively associated with a corresponding one of the power sources and a corresponding one of the plurality of operative arrangements, and wherein the system comprises a communication system which is configured to communicate the key code to any of the code-activated switch arrangements, and wherein each code-activated switch arrangement defines a unique activation code in hardware, and wherein a given code-activated switch arrangement is configured so as to selectively define at least part of an electrically conductive path from the corresponding power source to the corresponding operative arrangement according to whether the key code received by the given code-activated switch arrangement matches the unique activation code defined by the given code-activated switch arrangement.
 82. A system according to claim 78, comprising a plurality of keys, each key defining a unique key code in hardware corresponding to one of the unique activation codes defined by the code-activated switch arrangements, and the key reader being configured so as to read a key code from any of the keys.
 83. A system according to claim 78, wherein the communication system is configured to communicate the key code to each of the code-activated switch arrangements simultaneously or sequentially.
 84. A system according to claim 17, wherein each key defines a unique address in hardware, wherein the key reader is configured to read an address from any of the keys, and wherein the communication system is configured to selectively communicate the key code to one of the code-activated switch arrangements according to the address read by the key reader.
 85. A system according to claim 1, wherein the tool is configured to perform at least one of: an operation remotely from the key reader; an operation within an elongated space; and an operation defined by or within a wellbore.
 86. A system according to claim 1, wherein the tool comprises at least one of: a downhole tool; a perforating tool; a perforating gun; one or more sensors for sensing a property of an environment around the tool a temperature sensor; a pressure sensor; and one or more sensors for sensing a position, depth, orientation, speed, and/or acceleration of the tool.
 87. A system according to claim 1, wherein the operative arrangement of the tool is configured to perform an operation on an object or surface adjacent to the tool or an environment surround the tool, wherein the operative arrangement of the tool comprises an explosive charge, and optionally wherein the operative arrangement of the tool comprises a detonator for detonating the explosive charge.
 88. A system according to claim 1, comprising a user-interface controller located with, and configured for, communication with the key reader and a tool controller located with, and configured for, communication with the code-activated switch arrangement, wherein the user-interface controller is configured to display information representative of a status of at least one of the code-activated switch arrangement, an environment-dependent switch, a timer activated switch and a user operated switch.
 89. A system according to claim 88, wherein the user-interface controller is configured to display information representative of a property of an environment around the tool and/or a position, depth, orientation, speed and/or acceleration of the tool.
 90. A tool according to claim 55, wherein the tool comprises the power source. 